package com.dl.pojo;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @author DL
 * @create 2021-03-16 14:22
 */
@ApiModel("用户")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    private Integer id;
    private String username;
    private String password;
    private String email;
    private String salt;
    private Integer status;
    private String avatar;
    private String rolesInfo;

    //用户角色集合
    private List<Role> roles;
    private List<Permission> permissions;


    public User(String username, String password, String email, String salt) {
        this.username = username;
        this.password = password;
        this.email = email;
        this.salt = salt;
    }

}
